libxl: Add libxl__prepare_sockaddr_un() helper
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 24 Jul 2018 11:31:58 +0000 (12:31 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Tue, 21 Aug 2018 10:57:50 +0000 (11:57 +0100)
commit0beaf66e4f6d33bcbc47e740a168534f8727ef8d
treee9469dfee812016bd28eb5981af662bc42d1ea17
parente544b5978d00a32b2c3fb9636f9a7ab54228f13a
libxl: Add libxl__prepare_sockaddr_un() helper

There is going to be a few more users that want to use UNIX socket, this
helper is to prepare the `struct sockaddr_un` and check that the path
isn't too long.

Also start to use it in libxl_qmp.c.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_internal.h
tools/libxl/libxl_qmp.c
tools/libxl/libxl_utils.c